/*
 * Copyright 2011-2020 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0.
 * See `LICENSE` in the project root for license information.
 */

package me.ijleex.platform.uploadfile.entity;

import org.apache.ibatis.type.Alias;

import com.google.common.base.MoreObjects;

import me.ijleex.platform.framework.entity.EntitySupport;

/**
 * 上传文件 信息
 *
 * @author liym
 * @since 2019-10-30 17:52 新建
 */
@Alias("UploadFile")
public class UploadFile extends EntitySupport {

    /**
     * ID
     */
    private Long id;
    /**
     * 原始文件名称
     */
    private String name;
    /**
     * 文件路径，如 /6g/9d/rYarzNMLZKlxYJYjxxRGpqwWypzVNbvJ.jpg
     */
    private String path;
    /**
     * 文件类型
     * <p>请保存文件 Content-Type 或 Mime-Type 值，如 image/png、text/plain 等</p>
     */
    private String type;
    /**
     * 文件大小（Bytes）
     */
    private Long size;
    /**
     * 备注
     */
    private String remarks;
    /**
     * 状态
     * <pre>
     * 0-正常
     * 1-失效
     * 2-已加密
     * </pre>
     */
    private Integer state;

    public UploadFile() {
        super();
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPath() {
        return this.path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getType() {
        return this.type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Long getSize() {
        return this.size;
    }

    public void setSize(Long size) {
        this.size = size;
    }

    public String getRemarks() {
        return this.remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public Integer getState() {
        return this.state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    @Override
    public String toString() {
        return MoreObjects.toStringHelper(this)
                .add("name", this.name)
                .add("path", this.path)
                .add("type", this.type)
                .add("state", this.state)
                .toString();
    }

}
